﻿<views:NavigationPhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                      xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                                      xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                                      xmlns:viewModels="clr-namespace:YourLastOptionsDialog.ViewModels"
                                      xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                                      xmlns:views="clr-namespace:YourLastOptionsDialog.Views"
                                      x:Class="YourLastOptionsDialog.OptionsPage"
                                      mc:Ignorable="d"
                                      d:DesignWidth="480"
                                      d:DesignHeight="800"
                                      FontFamily="{StaticResource PhoneFontFamilyNormal}"
                                      FontSize="{StaticResource PhoneFontSizeNormal}"
                                      Foreground="{StaticResource PhoneForegroundBrush}"
                                      SupportedOrientations="Portrait"
                                      Orientation="Portrait"
                                      shell:SystemTray.IsVisible="False">
    <views:NavigationPhoneApplicationPage.DataContext>
        <viewModels:OptionsPageViewModel />
    </views:NavigationPhoneApplicationPage.DataContext>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"
          Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot x:Name="PivotControl"
                        Title="{Binding Title}"
                        ItemsSource="{Binding OptionItems}">
            <controls:Pivot.HeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Header}" />
                </DataTemplate>
            </controls:Pivot.HeaderTemplate>
            <controls:Pivot.ItemTemplate>
                <DataTemplate>
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled">
                        <ItemsControl ItemsSource="{Binding Options}"
                                      VerticalAlignment="Top"
                                      HorizontalAlignment="Stretch"
                                      Margin="0" />
                    </ScrollViewer>
                </DataTemplate>
            </controls:Pivot.ItemTemplate>
        </controls:Pivot>

        <toolkit:PerformanceProgressBar x:Name="ProgressBar"
                                        Foreground="{StaticResource PhoneAccentBrush}"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Stretch"
                                        IsIndeterminate="{Binding IsBusy}" />
    </Grid>

</views:NavigationPhoneApplicationPage>